maths tricks for fast calculation